<!DOCTYPE html>
<html xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
	<title>作者申请</title>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
	<link rel="stylesheet" href="../../css/bootstrap.min.css">
	<link rel="stylesheet" href="../../css/font-awesome.min.css">
	<link rel="stylesheet" href="../../plugins/jqgrid/ui.jqgrid-bootstrap.css">
	<link rel="stylesheet" href="../../plugins/ztree/css/metroStyle/metroStyle.css">
	<link rel="stylesheet" href="../../css/main.css">
	<link rel="stylesheet" href="../../css/layui.css">
	<script src="../../libs/jquery.min.js"></script>
	<script src="../../plugins/layer/layer.js"></script>
	<script src="../../libs/bootstrap.min.js"></script>
	<script src="../../libs/vue.min.js"></script>
	<script src="../../plugins/jqgrid/grid.locale-cn.js"></script>
	<script src="../../plugins/jqgrid/jquery.jqGrid.min.js"></script>
	<script src="../../plugins/ztree/jquery.ztree.all.min.js"></script>
	<script src="../../js/common.js"></script>
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
			<div class="form-group col-sm-2">
				<select v-model="authorApply.status" id="select_div" style="width: 200px" @change="cateName">
					<option selected  value="">全部</option>
					<option v-for="sel in sels" v-bind:value="sel.value">{{sel.week}}</option>
				</select>
			</div>
			<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="q.username" @keyup.enter="query" placeholder="用户名">
			</div>
			<a class="btn btn-default" @click="query">查询</a>
			<!--<#if shiro.hasPermission("sys:authorapply:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;审核</a>
			</#if>-->
			<a v-show="hasPermission('sys:authorapply:audit')" class="btn btn-primary btn-sm" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;审核</a>
			<!--<#if shiro.hasPermission("sys:authorapply:delete")>-->
			<a v-show="hasPermission('sys:authorapply:look')" class="btn btn-primary btn-sm" @click="info"><i class="fa fa-pencil-square-o"></i>&nbsp;查看详情</a>
			<a v-show="hasPermission('sys:authorapply:reason')" class="btn btn-primary btn-sm" @click="reason"><i class="fa fa-pencil-square-o"></i>&nbsp;查看拒绝原因</a>
			<a v-show="hasPermission('sys:authorapply:apply')" class="btn btn-primary btn-sm" @click="apply"><i class="fa fa-pencil-square-o"></i>&nbsp;申请成为签约作者</a>

            <!--<a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>-->
			<!--</#if>-->
		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>
    
    <div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
									<div class="form-group">
			   	<div class="col-sm-2 control-label">用户名</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="authorApply.username" placeholder="用户名" readonly="readonly"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">用户昵称</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="authorApply.nickname" placeholder="邮箱" readonly="readonly"/>
			    </div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">拒绝原因</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="authorApply.refuseReason" placeholder="拒绝原因"/>
				</div>
			</div>

            <div class="form-group">
				<div class="col-sm-2 control-label"></div> 
				<input type="button" class="btn btn-success" @click="pass" value="通过"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="refuse" value="拒绝"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-primary" @click="reload" value="返回"/>
			</div>

		</form>
	</div>
	<div id="bookDetail" v-show="showDetail" @click="closeDetail(0)">
		<div id="smallBox">
		<!--<div id="detailTitle">-->
			<!--<span>书名</span>-->
			<!--<span>作者</span>-->
			<!--<span>总章节数</span>-->
			<!--<span>总字数</span>-->
		<!--</div>-->
		<!--<div v-for="(item,index) in userDetail" :key="index" id="detailScroll" @click="closeDetail(1)">-->
				<!--<div id="eachBook">-->
				<!--<span>{{item.bookname}}</span>-->
				<!--<span>{{item.authorName}}</span>-->
				<!--<span>{{item.sectionNumber}}</span>-->
				<!--<span>{{item.fontCount}}</span>-->
				<!--</div>-->
		<!--</div>-->
			<table class="layui-table" lay-even lay-skin="line" lay-size="lg" @click="closeDetail(1)">
				<colgroup>
					<col width="150">
					<col width="200">
					<col>
				</colgroup>
				<thead>
				<tr>
					<th>书籍名</th>
					<th>作者</th>
					<th>总章节数</th>
					<th>总字数</th>
				</tr>
				</thead>
				<tbody>
				<tr v-for="(item,index) in userDetail" :key="index">
					<td>{{item.bookname}}</td>
					<td>{{item.authorName}}</td>
					<td>{{item.sectionNumber}}</td>
					<td>{{item.fontCount}}</td>
				</tr>
				</tbody>
			</table>
		</div>
	</div>
	<div id="breifDetail" v-show="showBreif" @click="closeBreif(0)">
		<div id="breifBox">
		<table class="layui-table tablelll" lay-even lay-skin="line"  @click="closeBreif(1)">
			<colgroup>
				<col width="50">
				<col width="50">
				<col width="200">
			</colgroup>
			<thead>
			<tr>
				<th>用户名</th>
				<th>昵称</th>
				<th>内容</th>
			</tr>
			</thead>
			<tbody>
			<tr>
				<td>{{littleBrief.username}}</td>
				<td>{{littleBrief.nickname}}</td>
				<td id="textLand"  v-html="littleBrief.text"></td>
			</tr>
			</tbody>
		</table>
		</div>
	</div>
</div>


<script src="../../js/modules/sys/authorapply.js"></script>
</body>
</html>